home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20030409-20031118 / 000043_jaltman2@nyc.rr.com_Fri May 2 09:21:33 EDT 2003.msg < prev    next >
Text File  |  2020-01-01  |  4KB  |  87 lines

  1. Article: 14258 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!phl-feed.news.verio.net!iad-feed.news.verio.net!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!out.nntp.be!propagator2-sterling!in.nntp.be!newsfeed1.easynews.com!easynews.com!easynews!news-west.rr.com!news-server.columbus.rr.com!cyclone.rdc-nyc.rr.com!news-out.nyc.rr.com!twister.nyc.rr.com.POSTED!53ab2750!not-for-mail
  3. From: "Jeffrey Altman [Road Runner NYC]" <jaltman2@nyc.rr.com>
  4. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312
  5. X-Accept-Language: en-us, en
  6. MIME-Version: 1.0
  7. Newsgroups: comp.protocols.kermit.misc
  8. Subject: Re: Changed behavior of receive/transmit move-to
  9. References: <b8rfll$kfv$1@cpimail.cpicorp.com> <b8rkdi$mo0$1@watsol.cc.columbia.edu> <3EB182CB.8000502@nyc.rr.com> <b8s3qt$bkm$1@watsol.cc.columbia.edu>
  10. In-Reply-To: <b8s3qt$bkm$1@watsol.cc.columbia.edu>
  11. Content-Type: text/plain; charset=us-ascii; format=flowed
  12. Content-Transfer-Encoding: 7bit
  13. Lines: 64
  14. Message-ID: <7Sgsa.48386$J17.32926@twister.nyc.rr.com>
  15. Date: Thu, 01 May 2003 22:04:51 GMT
  16. NNTP-Posting-Host: 66.108.138.151
  17. X-Complaints-To: abuse@rr.com
  18. X-Trace: twister.nyc.rr.com 1051826691 66.108.138.151 (Thu, 01 May 2003 18:04:51 EDT)
  19. NNTP-Posting-Date: Thu, 01 May 2003 18:04:51 EDT
  20. Organization: Road Runner - NYC
  21. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14258
  22.  
  23. Frank da Cruz wrote:
  24. >> Turns out no changes were needed here.  SET { SEND, RECEIVE } MOVE-TO
  25. > did not need to use deferred evaluation of embedded variables, since we're
  26. > dealing with names of directories which must already exist (at least for
  27. > now).  SET { SEND, RECEIVE } RENAME-TO already deferred evaluation of
  28. > embedded variables, so it does not make sense to change it.  Except that it
  29. > was totally broken anyway (it always got a parse error), and that's just
  30. > been fixed.
  31.  
  32. I am not convinced that this is an acceptable solution.  The naive end 
  33. user who interactively issues the commands
  34.  
  35.    CD foo
  36.    DIR bar
  37.  
  38. sees that 'bar' does exist and now issues
  39.  
  40.    SET RECEIVE MOVE-TO bar
  41.  
  42. is going to end up with quite a surprise if s/he accidently changes 
  43. directory.  Either the file transfer will fail; or the files may
  44. unexpectedly be placed into random locations on the disk.  This
  45. behavior could in some situations even be dangerous and irreversible
  46. if the unexpected MOVE-TO results in files of the same name being
  47. overwritten.
  48.  
  49. Unless the user explicitly requests that the directory be treated as
  50. relative to the current working directory at the time of file transfer
  51. the specified path must be treated as referring to a fixed location.
  52.  
  53. We should not intentionally be adding features to Kermit which are going
  54. to hurt people who do not happen to know every in and out of the program.
  55.  
  56. If deferred evaluation is a necessity, then it must be implemented 
  57. either with a new command or a switch.  If you do not want to deal with
  58. the difficulties of parsing a switch prior to the filename parse it 
  59. afterwards.
  60.  
  61.   SET {SEND, RECEIVE} MOVE-TO <path> {/DEFERRED-EVALUATION} {/CREATE-DIR}
  62.  
  63. > : I think there is a better solution.  Kermit already supports on_open, 
  64. > : on_close, and on_exit macros.  I propose that we simply add support for 
  65. > : a new on_cd macro...
  66. > :
  67. > I'll add this to my to-do list and/or revisit it if today's changes are
  68. > not sufficient.
  69.  
  70. The code to implement the processing of an on_cd macro is trivial.
  71. Add the following code to the end of zchdir():
  72.  
  73. #ifndef NOSPL
  74.     if (nmac) {             /* Any macros defined? */
  75.       int k;                /* Yes */
  76.       k = mlook(mactab,"on_cd",nmac); /* Look this up */
  77.       if (k >= 0) {                   /* If found, */
  78.         if (dodo(k,zgtdir(),0) > -1)  /* set it up, */
  79.           parser(1);                  /* and execute it */
  80.       }
  81.     }
  82. #endif /* NOSPL */
  83.  
  84.  
  85.  
  86.  
  87.